﻿using System;

namespace Fwql.Net.Exceptions
{
    /// <summary>
    /// 联合异常，一般包含多个内部异常信息
    /// </summary>
    public class CombinedException : Exception
    {
        /// <summary>
        /// 初始化<see cref = "CombinedException" />异常类.
        /// </summary>
        /// <param name = "message">异常信息</param>
        /// <param name = "innerExceptions">内部异常组</param>
        public CombinedException(string message, Exception[] innerExceptions) : base(message)
        {
            InnerExceptions = innerExceptions;
        }

        /// <summary>
        /// 返回内部异常组
        /// </summary>
        public Exception[] InnerExceptions { get; protected set; }
    }
}